<template>
    <div style="margin: 16px;">
        <van-button round block type="info" @click="handleClick">确定</van-button>
    </div>
</template>

<script>
    export default {
        name: 'rpwd',
        props: {
            // 可以定义props让组件更灵活
            buttonText: {
                type: String,
                default: '确定'
            },
            buttonType: {
                type: String,
                default: 'info'
            }
        },
        methods: {
            handleClick() {
                // 触发自定义事件，将控制权交给父组件
                this.$emit('comfirm')
            }
        }
    }
</script>